package ys.ewp.junit;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import ys.ewp.service.AccountService;
import ys.ewp.service.ColumnService;
import ys.ewp.service.CommentService;
import ys.ewp.service.DepartmentService;
import ys.ewp.service.EmployeeService;
import ys.ewp.service.TaskParticipantService;
import ys.ewp.service.NoticeService;
import ys.ewp.service.TaskLevelService;
import ys.ewp.service.TaskService;
import ys.ewp.service.TaskStatusService;
import ys.ewp.service.UserFieldService;

/**
 * @name 基础测试类
 * @author 黄健
 * @description 负责实例化所有服务层对象
 */
public class BaseJunit {
	
	private ApplicationContext ac = new ClassPathXmlApplicationContext(
			new String[] { "applicationContext.xml" });
	
	protected NoticeService noticeService;
	protected ColumnService columnService;
	protected CommentService commentService;
	protected EmployeeService employeeService;
	protected DepartmentService departmentService;
	protected UserFieldService userFieldService;
	protected AccountService accountService;
	protected TaskService taskService;
	protected TaskLevelService taskLevelService;
	protected TaskStatusService taskStatusService;
	protected TaskParticipantService taskParticipantService;
		
	public BaseJunit() {
		noticeService = (NoticeService) ac.getBean("noticeService");
		columnService = (ColumnService) ac.getBean("columnService");
		commentService = (CommentService) ac.getBean("commentService");
		employeeService = (EmployeeService) ac.getBean("employeeService");
		departmentService = (DepartmentService) ac.getBean("departmentService");
		userFieldService = (UserFieldService) ac.getBean("userFieldService");
		accountService = (AccountService) ac.getBean("accountService");
		taskService = (TaskService) ac.getBean("taskService");
		taskLevelService = (TaskLevelService) ac.getBean("taskLevelService");
		taskStatusService = (TaskStatusService) ac.getBean("taskStatusService");
		taskParticipantService = (TaskParticipantService) ac.getBean("taskParticipantService");
	}
	
}
